<?php 

class sRules {
	private $input = null;
	
	public function __construct($input) {
		$this->input = $input;
	}
	
	public function validateRequired() {
		//$in = trim($in);
		return !empty($_REQUEST[$this->input]);
	}
	
	public function validateEmail() {
		return strpos($_REQUEST[$this->input], '@');
	}
	
	public function validateInteger() {
		return is_int($_REQUEST[$this->input]);
	}
	
	public function validateBool() {
		return is_bool($_REQUEST[$this->input]);
	}
	
	public function validateNumeric() {
		return is_numeric($_REQUEST[$this->input]);
	}
}

?>